/**
 * 一些通用的api
 */
import axios from "./http"; // 导入http中创建的axios实例
import GLOBAL from "./global_variable";

const commonHandle = {
  // 登陆
  getLogin: (data) => {
    return axios.post(GLOBAL.BASE_URL_REQUEST + "/TUser/Login", data);
  },
  // 查询服务端登陆人员列表
  getLoginAccountList: () => {
    return axios.post(GLOBAL.BASE_URL_REQUEST + "/TUser/FindList", {
      pageSize: 9999,
      pageIndex: 1,
      orderBy: "",
    });
  },
  // 添加服务端登陆人员帐号
  addLoginAccount: (data) => {
    return axios.post(GLOBAL.BASE_URL_REQUEST + "/TUser/Add", data);
  },
  // 修改服务端登陆人员信息
  editLoginAccount: (data) => {
    return axios.post(GLOBAL.BASE_URL_REQUEST + "/TUser/Modify", data);
  },
  // 删除服务端人员帐号
  removeLoginAccount: (data) => {
    return axios.post(GLOBAL.BASE_URL_REQUEST + "/TUser/BatchRemove", data);
  },
};
export default commonHandle;
